if (!jsx3.lang.Class.forName("ux.cdb.admin.loan.VerifyBorrow.VerifyBorrow")) {
/**
 * Define the <code>name of class</code> class.
 * This class inherit from <code>jsx3.gui.Block<code> GUI class.
 */
jsx3.Class.defineClass(
    "ux.cdb.admin.loan.VerifyBorrow.VerifyBorrow",
    jsx3.gui.Dialog,
    null,
    function (verifyborrow) {
      /**
       * This method will be called after UI file has deserialized.
       */
      verifyborrow.prototype.onAfterDeserialize = function() {
      	this.starBlock_shenheyijian = this.get("starBlock_shenheyijian");
      	var lbl = this.get("lblMessage");
      	lbl.setText('',true);
      	
      	var  currentUser = ux.cdb.admin.Privilege.getUser();
      	jsx3.log("VerifyBorrow currentUser:"+currentUser.userName);      	
      	this.get("label_userName").setText(currentUser.userName,true);
      	
      	var myDate = new Date();
      	var currentDate = myDate.getYear()+"-"+(myDate.getMonth()+1)+"-"+myDate.getDate();
      	jsx3.log("VerifyBorrow currentDate:"+currentDate);   
      	this.get("label_verifyDate").setText(currentDate,true);
      }
      
      verifyborrow.prototype.onRadioSelect = function(verifyResult){
      	if(verifyResult != 1){
      		this.starBlock_shenheyijian.setDisplay(jsx3.gui.Block.DISPLAYBLOCK,true);
      	}else{
      		this.starBlock_shenheyijian.setDisplay(jsx3.gui.Block.DISPLAYNONE,true);
      		var lbl = this.get("lblMessage");
      		lbl.setText('',true);
      	}
      }
      
      verifyborrow.prototype.onSave = function(){
      	var verifyResult = this.get("radio1").getGroupValue();
        var verifyOpinion = this.get("textarea_shenheyijian").getValue();
        var lbl = this.get("lblMessage");
        if(verifyResult!=1 && (verifyOpinion == null || verifyOpinion == "")){        	
        	var tip = ux.megatron.Main.getServer().getDynamicProperty("@cdb@LoanManage@Wizard@WizardSetp2_validateFail");
        	lbl.setColor('red');
          lbl.setText(tip,true);
          return;
        }
        lbl.setText('',true);      
        var tips = ux.megatron.Main.getServer().getDynamicProperty("@cdb@LoanManage@Wizard@VerifyQueRen");
        var titles = ux.megatron.Main.getServer().getDynamicProperty("@cdb@LoanManage@Wizard@QueRenSubmit");
        var me = this;
        var result =  ux.megatron.Dialog.confirmUponParent(me, titles,tips, function(dialog){
       		me.doSave();
       		dialog.doClose();
        	});
        return;  
        //to be done to call the server
        /*var params = [];
        params.push(this.virtualIds);
        params.push(2);
        params.push(verifyResult);
        params.push(verifyOpinion);
        params.push(null);
        params.push(null);
        var me = this;
        ux.megatron.util.Dwr.callDwr("RetailStudentLoanExamUCC", "saveOpinionForUnFormatData", 
            params, me, me.onCallSaveBack, "RetailStudentLoanExamUCC");*/
      }
      
      verifyborrow.prototype.doSave = function(){
      	var verifyResult = this.get("radio1").getGroupValue();
      	verifyResult = "0"+verifyResult;
      	jsx3.log("verifyResult :"+verifyResult);
        var verifyOpinion = this.get("textarea_shenheyijian").getValue();
      	var params = [];
        params.push(this.appBaseInfos);
        params.push(2);
        params.push(verifyResult);
        params.push(verifyOpinion);
        params.push(null);
        params.push(null);
        var me = this;
        ux.megatron.util.Dwr.callDwr("RetailStudentLoanExamUCC", "saveOpinionForUnFormatData", 
            params, me, me.onCallSaveBack, "RetailStudentLoanExamUCC");
      }
      
      verifyborrow.prototype.onCallSaveBack = function(reData){      	
      	if(!reData)
					jsx3.log("call loadRcpPkgData failed......");
				
				var flag = reData.res.flag;
				jsx3.log("on verify Back flag: "+flag);
        if(flag != 1){
        	var msg = reData.res.msg;
        	alert(msg);
        	jsx3.log("call loadRcpPkgData failed: "+msg);
        	return;
        }
        
        var loanManage = ux.megatron.Main.getServer().getRootBlock().getDescendantsOfType("ux.cdb.admin.loan.LoanManage")[0];
				loanManage.onRefresh();
        this.doClose(); 
      }  
    }
  );
}